// import React, {useEffect, useState} from 'react';
// import ReactMarkdown from 'react-markdown';//引入
// //import md from './README.md';
//
// const App=({url})=>{
//
//     const [mdContent, setMdContent] = useState('')
//
//     useEffect(() => {
//         //url是markdown文件的路径，我在项目中是放到了media文件夹下，示例：url为'/media/xx.md'
//         fetch(url)
//             .then(res => res.text())
//             .then(text => setMdContent(text));
//     }, []);
//
// return(
//     <ReactMarkdown
//         className='markdown-body'
//         children={mdContent}
//     />
// )
// }
//
// export default App



import "vditor/dist/index.css";
import React from "react";
import Vditor from "vditor";

const App = () => {

    const [vd, setVd] = React.useState();
    React.useEffect(() => {
        const vditor = new Vditor("vditor", {
            after: () => {
                vditor.setValue("# 111\n" +
                    "\n" +
                    "> ​\t11111\n" +
                    ">\n" +
                    "> 1111111");
                setVd(vditor);
            }
        });

    }, []);
    return(<div>
        <button onClick={()=>{console.log()}}></button>
      <div id="vditor" className="vditor" />
    </div>);
};

export default App;
